﻿<%@ Page Language="C#" MasterPageFile="~/MasterPageUser.master" AutoEventWireup="true" CodeFile="InsuranceDetails.aspx.cs" Inherits="InsuranceDetails" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1">
        <ItemTemplate>
            <h2>
            <asp:Label ID="InsuranceTypeLabel" runat="server" 
                Text='<%# Eval("InsuranceType") %>' /></h2>
            
            
            <asp:Label ID="DescriptionLabel" runat="server" 
                Text='<%# Eval("Description") %>' />
            <br />
            <br />
        </ItemTemplate>
    </asp:DataList>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:connString %>" 
        SelectCommand="SELECT InsuranceType, Description FROM Insurance WHERE (InsuranceId = @InsuranceId)">
        <SelectParameters>
            <asp:QueryStringParameter Name="InsuranceId" QueryStringField="InsuranceId" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="InsuranceId" DataSourceID="SqlDataSource2" BackColor="White" 
        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
        EnableModelValidation="True" ForeColor="Black" GridLines="Horizontal">
        <Columns>
            <asp:BoundField DataField="ValueType" HeaderText="" 
                SortExpression="ValueType" />
            <asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" />
        </Columns>
        <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
        <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:connString %>" 
        SelectCommand="SELECT Value.ValueType, Value.Price, Insurance.InsuranceId FROM Insurance INNER JOIN Value ON Insurance.InsuranceId = Value.InsuranceId WHERE (Insurance.InsuranceId = @InsuranceId)">
        <SelectParameters>
            <asp:QueryStringParameter Name="InsuranceId" QueryStringField="InsuranceId" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

